﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlCapQuanLys.ascx.cs" Inherits="WebUserControl_WebUserControl2" %>
<%@ Register src="uscMsgBox.ascx" tagname="uscMsgBox" tagprefix="uc2" %>
 
 <%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPivotGrid" tagprefix="dxwpg" %>

<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v9.2.Export, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.XtraPivotGrid.Web" tagprefix="dxpgw" %>

<link rel="stylesheet" href='<%=ResolveUrl("~/LayoutCss/K_BaoCaoFormLayout.css")%>' type="text/css" />


<script type="text/javascript">
     function pageLoad() {
       $("#<%= Button1.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff' 
        } }); 
        }); 
          $("#<%= Button2.ClientID %>").click(function() { 
        $.blockUI({
             message: '<h1>Xin vui lòng chờ xử lý</h1>', 
            css: { 
            border: 'none', 
            padding: '15px', 
            backgroundColor: '#f00', 
            opacity: .5, 
            color: '#fff'
        } }); 
         setTimeout($.unblockUI, 5000); 
        }); 
        
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                function EndRequestHandler(sender, args) {
                        $.unblockUI();
                }
        }  
   
</script> 


<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<Triggers>
<asp:PostBackTrigger ControlID="Button2" />
</Triggers>
    <ContentTemplate>
 <fieldset>
    <legend>Báo cáo cấp quản lý trong năm</legend>
    <div class="fm-req">
      <label for="DropTTPP">TTPP:</label>
      <asp:DropDownList Width="200px" ID="DropTTPP" runat="server">
                    </asp:DropDownList>
      </div>
      </fieldset>
      <div>
      <asp:Button ID="Button1" runat="server" Text="Báo cáo" 
                                onclick="Button1_Click" />
                            &nbsp;&nbsp; 
                            <asp:Button ID="Button2" runat="server" Text="Xuất ra Excel" onclick="Button2_Click"/>
      </div>
         
            <br />
       <dxwpg:ASPxPivotGrid ID="ASPxPivotGrid1" runat="server" 
            CustomizationFieldsVisible="True" CustomizationFieldsLeft="700" 
            CustomizationFieldsTop="400">
             <Fields>
          <dxwpg:PivotGridField HeaderStyle-BackColor="Yellow" ID="PivotGridField1" Area="FilterArea" AreaIndex="0" Caption="Báo cáo cấp quản lý trong năm" 
                     FieldName="Baocao" Visible="True">
                 </dxwpg:PivotGridField>
                  <dxwpg:PivotGridField HeaderStyle-BackColor="Yellow" ID="PivotGridField2" Area="FilterArea" AreaIndex="1" Caption="TTPP : " 
                     FieldName="FromDate" Visible="True">
                 </dxwpg:PivotGridField>
                 <dxwpg:PivotGridField HeaderStyle-BackColor="Yellow" ID="PivotGridField4" Area="FilterArea" AreaIndex="3" Caption="Giờ : " 
                     FieldName="Time" Visible="True">
                 </dxwpg:PivotGridField>
            </Fields> 
            </dxwpg:ASPxPivotGrid>
            <br />
             <dxpgw:ASPxPivotGridExporter ASPxPivotGridID="ASPxPivotGrid1" ID="ASPxPivotGridExporter1" runat="server">
        </dxpgw:ASPxPivotGridExporter>
             
            <uc2:uscMsgBox ID="uscMsgBox1" runat="server" />

         
    </ContentTemplate>
</asp:UpdatePanel>

